﻿<UserControl 
  x:Class="MedLink2011.MainPage"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
  xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:Theming="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ExpressionDark"
	xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
	xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"

    xmlns:login="clr-namespace:MedLink2011.LoginUI" 
    mc:Ignorable="d" >
    <!-- Layout Root -->
    <Grid x:Name="LayoutRoot" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!-- Page Header -->
        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <!--<MedLink2011:PageHeaderUserControl Grid.Row="0"/>-->
            <!--<login:LoginStatus Grid.Row="0"></login:LoginStatus>-->
            <Border Style="{StaticResource LoginContainerStyle}" Height="Auto" Margin="0,10,0,0" ToolTipService.ToolTip="Electronic Medical Records">
                <login:LoginStatus Grid.Row="0"></login:LoginStatus>
            </Border>
        </Grid>
        <!-- Main Content -->
        <Theming:ExpressionDarkTheme Grid.Row="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <!-- Main Menu -->
                <controlsToolkit:Expander x:Name="MainExpander" Header="Menu" Grid.Row="0" ExpandDirection="Left" IsExpanded="True">
                    <ScrollViewer  HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                        <Border BorderBrush="GhostWhite" BorderThickness="1">
                            <Border.Background>
                                <SolidColorBrush />
                            </Border.Background>
                            <StackPanel Orientation="Vertical">
                                <TextBlock Text="Main Menu" FontSize="14" VerticalAlignment="Top" Margin="5" Foreground="WhiteSmoke" HorizontalAlignment="Center"/>
                                <layoutToolkit:Accordion  x:Name="MainAccordion" Margin="0" VerticalAlignment="Top" HorizontalAlignment="Stretch" SelectionMode="ZeroOrMore"  Width="200" >
                                    <!-- Pacientes -->
                                    <layoutToolkit:AccordionItem  >
                                        <layoutToolkit:AccordionItem.HeaderTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                                    <Image VerticalAlignment="Center" Source="/MedLink2011;component/Assets/Resources/Images/32/Paste32.pn" 
														 />
                                                    <TextBlock Text="Patients" Margin="6,2" VerticalAlignment="Center"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </layoutToolkit:AccordionItem.HeaderTemplate>
<StackPanel Orientation="Vertical">

                                            <!-- patients WorkWith-->
                                            <HyperlinkButton NavigateUri="/Patients/WorkWith/PatientsWorkWith" TargetName="NavigationFrame" IsTabStop="False"  >
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Margin="3" Source="/MedLink2011;component/Assets/Resources/Images/48/AddYellow48.png" 
														 />
                                                    <TextBlock Margin="5" Text="Patients" VerticalAlignment="Center"/>
                                                </StackPanel>
                                            </HyperlinkButton>
                                            <!-- Dashboard-->
                                            <!--<HyperlinkButton NavigateUri="/Dashboard/DashboardP" TargetName="NavigationFrame" IsTabStop="False"  >
                                        <StackPanel Orientation="Horizontal">
                                            <Image Margin="3" Source="/MedLink2011;component/Assets/Resources/Images/48/AddYellow48.png"/>
                                            <TextBlock Margin="5" Text="Dashboard" VerticalAlignment="Center"/>
                                        </StackPanel>
                                    </HyperlinkButton>-->
                                        </StackPanel>
                                    </layoutToolkit:AccordionItem>
                                    <!-- Doctors -->
                                    <layoutToolkit:AccordionItem VerticalAlignment="Top">
                                        <layoutToolkit:AccordionItem.HeaderTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/MedLink2011;component/Assets/Resources/Images/GroupOfUsersAdd48.png" 
														 />
                                                    <TextBlock Text="Doctors" Margin="6,2"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </layoutToolkit:AccordionItem.HeaderTemplate>
<StackPanel Orientation="Vertical">
                                            <!--  Doctores -->
                                            <HyperlinkButton NavigateUri="/WorkOrdersViews/TimeEntrySearchView" TargetName="NavigationFrame" IsTabStop="False" >
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/MedLink2011;component/Assets/Resources/Images/48/AddYellow48.png"
														 />
                                                    <TextBlock Text="Doctors" />
                                                </StackPanel>
                                            </HyperlinkButton>
                                        </StackPanel>
                                    </layoutToolkit:AccordionItem>
                                            

                                    <!-- Admin -->
                                    <layoutToolkit:AccordionItem VerticalAlignment="Top">
                                        <layoutToolkit:AccordionItem.HeaderTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/MedLink2011;component/Assets/Resources/Images/Save%20Locked%20%28Yellow%2948.png" 
														 />
                                                    <TextBlock Text="Administracion" Margin="6,2"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </layoutToolkit:AccordionItem.HeaderTemplate>
                            <StackPanel Orientation="Vertical">
                                            <!-- Admin 1 -->
                                            <HyperlinkButton NavigateUri="/SetupCodesViews/VendorsView" 
															 TargetName="NavigationFrame" IsTabStop="False" x:Name="VendorsButton" Grid.Row="1">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/MedLink2011;component/Assets/Resources/Images/Forbidden48.png" 
														 />
                                                    <TextBlock Text="Admin1" />
                                                </StackPanel>
                                            </HyperlinkButton>
                                         </StackPanel>
                                    </layoutToolkit:AccordionItem>
                                </layoutToolkit:Accordion>
                            </StackPanel>
                        </Border>
                    </ScrollViewer>
                </controlsToolkit:Expander>
                <!-- Home1 - Navigation Frame -->
                <navigation:Frame x:Name="NavigationFrame"  
						  Source="/Home" NavigationFailed="ContentFrame_NavigationFailed"
						  Grid.Column="1" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
						  Margin="1" RenderTransformOrigin="0.5,0.5" 
						  UseLayoutRounding="False">
                    <navigation:Frame.Background>
                        <ImageBrush ImageSource="/MedLink2011;component/Assets/Resources/Images/Medical2.jpg" Stretch="Fill" />
                    </navigation:Frame.Background>
                    <navigation:Frame.UriMapper>
                        <uriMapper:UriMapper>
                            <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
                            <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
                        </uriMapper:UriMapper>
                    </navigation:Frame.UriMapper>
                </navigation:Frame>
 
            </Grid>
        </Theming:ExpressionDarkTheme>

    </Grid>
</UserControl>